package com.ggh.util;

import com.ggh.handler.RobBanker_TimeP;
import com.ggh.handler.RobBanker_TimePSiRen;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * @author jj
 * @date 2019/10/10 15:28
 * 解析工具j
 */
public class JsonUtils {
    private static final  Gson gson = new GsonBuilder() .setExclusionStrategies(new ExclusionStrategy() {
                @Override
                public boolean shouldSkipField(FieldAttributes f) {
                    return false;
                }
                @Override
                public boolean shouldSkipClass(Class<?> incomingClass) {
                    return incomingClass == RobBanker_TimeP.class||incomingClass == RobBanker_TimePSiRen.class;
                }
             }) .create();
   /**
   * @description :获取解析工具类
   * @return: com.google.gson.Gson
   * @date : 2019/10/10 15:33
   * @author : jj
   * @throws
   */
    public static Gson get() {
        return gson;
    }

}
